{{ define "section_content" }}
<article role="article" class="flex-container">
    {{ .Content }}
</article>

{{ if .Params.clickablePhotos }}
    <div class="grid">
    {{ $images := .Resources.ByType "image" }}
    {{ range shuffle $images }}
    {{ $resized := .Resize $.Params.maxWidth }}
        <div>
            <a href="{{ .RelPermalink }}">
                <img src="{{ $resized.RelPermalink }}" alt="{{ .Name }}" />     
            </a>
        </div>
        {{ end }}
    </div>
{{ else }}
    <div class="grid">
    {{ $images := .Resources.ByType "image" }}
    {{ range shuffle $images }}
    {{ $resized := .Resize $.Params.maxWidth }}
        <div>
            <img src="{{ $resized.RelPermalink }}" alt="{{ .Name }}" />
        </div>
    {{ end }}

    </div>
{{ end }}
{{ end }}